package split.temporary.variable;

/**
 * Created by Administrator on 2018/1/25.
 */
public class Test {

    private double height;
    private double width;

    void test() {
        double temp = 2 * (height + width);
        System.out.println(temp);
        temp = height * width;
        System.out.println(temp);
    }

    //针对每次赋值，创建一个独立、对应的临时变量
    void testRF() {
        final double perimeter = 2 * (height + width);
        System.out.println(perimeter);
        final double area = height * width;
        System.out.println(area);
    }

}
